home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
BASIC
/
JTEST.BAS
< prev
next >
Wrap
BASIC Source File
|
2000-09-26
|
599b
|
31 lines
$INCLUDE "REGNAMES.INC"
COLOR 1,1
CLS
COLOR 12,1 : PRINT "Ende mit beliebiger Taste"
WHILE INKEY$=""
CALL Joystick
LOCATE 8,1
COLOR 5,1 : PRINT "Feuertasten: ";hex$(fire);" "
COLOR 7,1 : PRINT "Joystick A X=";x1;" Y=";y1;" "
COLOR 14,1 : PRINT "Joystick B X=";x2;" Y=";y2;" "
WEND
SCREEN 0
CLS
?"<< Taste >>"
END
SUB Joystick SHARED
REG %AX,(&H84*256)
REG %DX,1
CALL INTERRUPT &H15
x1=REG(%AX)
y1=REG(%BX)
x2=REG(%CX)
y2=REG(%DX)
REG %AX,(&H84*256)
REG %DX,0
CALL INTERRUPT &H15
fire%=REG(%AX)
fire=PEEK(VARPTR(fire%)+0)
END SUB